<?php 
if (isset($this->categoria)) {
	foreach($this->categoria as $categoria) {
		$id = $categoria->id;
		$nome = utf8_encode($categoria->cat_nome);
	}
}
?>
<div class="row">
<div class="span12">
	<form method="post" action="<?=URL.'categorias/alterar'; ?>">
    <fieldset>
    <legend>Alterar Categoria</legend>
    	<div class="control-group">
        <label for="cat_nome">Nome</label>
        <input type="text" name="cat_nome" id="cat_nome" placeholder="Categoria" value="<?=$nome; ?>" autofocus required>
        <input type="hidden" name="id" value="<?=$id; ?>">
        </div>
        <button type="submit" class="btn">Alterar</button>
    </fieldset>
    </form>
    <?php 
		if(isset($this->msg)) {
			echo $this->msg;
		}
	?>		
</div>
</div>